package cl.gob.minvu.catastro.model;

import java.io.Serializable;
import java.math.BigInteger;

import javax.persistence.*;

import java.util.List;


/**
 * The persistent class for the TIPO_ACCION database table.
 * 
 */
@Entity
@Table(name="TIPO_ACCION")
@NamedQuery(name="TipoAccion.findAll", query="SELECT t FROM TipoAccion t")
public class TipoAccion implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="IDTIPOACCION")
	private BigInteger idtipoaccion;

	@Column(name="GLOSA")
	private String glosa;

	//bi-directional many-to-one association to Log
	@OneToMany(mappedBy="tipoAccion")
	private List<Log> logs;

	public TipoAccion() {
	}

	public BigInteger getIdtipoaccion() {
		return this.idtipoaccion;
	}

	public void setIdtipoaccion(BigInteger idtipoaccion) {
		this.idtipoaccion = idtipoaccion;
	}

	public String getGlosa() {
		return this.glosa;
	}

	public void setGlosa(String glosa) {
		this.glosa = glosa;
	}

	public List<Log> getLogs() {
		return this.logs;
	}

	public void setLogs(List<Log> logs) {
		this.logs = logs;
	}

	public Log addLog(Log log) {
		getLogs().add(log);
		log.setTipoAccion(this);

		return log;
	}

	public Log removeLog(Log log) {
		getLogs().remove(log);
		log.setTipoAccion(null);

		return log;
	}

}